// MIT License
// 开源地址：https://gitee.com/co1024/AbcMvc
// Copyright (c) 2021-2022 1024
// Abc.Mvc=Furion+EF+SqlSugar+Pear layui admin.

namespace Abc.Core;

/// <summary>
/// 分页参数
/// </summary>
public class PagedBaseQuery
{
    /// <summary>
    /// 页数
    /// </summary>
    private int _pageIndex = 1;

    /// <summary>
    /// 页数
    /// </summary>
    public int PageIndex
    {
        get
        {
            if (_pageIndex > 0)
            {
                return _pageIndex;
            }
            return 1;
        }
        set => _pageIndex = value;
    }

    /// <summary>
    /// 查询条数
    /// </summary>
    private int _pageSize = 10;

    /// <summary>
    /// 查询条数
    /// </summary>
    public int PageSize
    {
        get
        {
            if (_pageSize > 0)
            {
                return _pageSize;
            }
            return 10;
        }
        set => _pageSize = value;
    }
}